#include "display_teleop.h"

#include <pluginlib/class_list_macros.h>
#include <rviz/properties/bool_property.h>
#include <rviz/properties/float_property.h>
#include <rviz/properties/string_property.h>
#include <rviz/properties/ros_topic_property.h>
#include <rviz/window_manager_interface.h>
#include <rviz/display_context.h>

namespace rviz_plugins
{
    DisplayTeleop::DisplayTeleop()
        : Display()
    {   
    }

    DisplayTeleop::~DisplayTeleop()
    {
        delete frame_dock_;
    }
    
    void DisplayTeleop::onInitialize()
    {
        Display::onInitialize();

        panel_ = new TeleopPanel();
        rviz::WindowManagerInterface* windowContext = context_->getWindowManager();
        if (windowContext)
        {
            frame_dock_ = windowContext->addPane("Teleop", panel_);
        }
    }

    PLUGINLIB_EXPORT_CLASS(rviz_plugins::DisplayTeleop, rviz::Display)
} // end namespace rviz_plugins
